home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14465 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  665 b 

  1. Path: news.mira.net.au!news
  2. From: davidw@werple.net.au (David White)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help Please
  5. Date: 31 Mar 1996 07:58:17 +1000
  6. Organization: Werple Internet, Melbourne
  7. Message-ID: <4jkapp$heu@werple.net.au>
  8. References: <4ji7eo$kgm@daisy.flex.com.au>
  9. NNTP-Posting-Host: werplez.mira.net.au
  10.  
  11. cobweb@flex.com.au (Tony L) writes:
  12.  
  13. >    if (last2 == him)
  14. >        { printf("you have voted for Paul Keating!"); }
  15. >    else
  16. >    { printf("\nYou didn't vote for Paul Keating!");  }
  17.  
  18. This 'if' compares the address of 'last2' with the address of 'him'; it 
  19. doesn't compare the contents. You need 'if(!strcmp(last2, him))'.
  20.  
  21. David White
  22. davidw@werple.mira.net.au
  23.  
  24.